# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-dominate
pkgver=2.9.0
pkgrel=1
pkgdesc="A Python library for creating and manipulating HTML documents using an elegant DOM API"
url="https://github.com/Knio/dominate"
license=('LGPL')
arch=('any')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Knio/dominate/archive/$pkgver.tar.gz")
sha512sums=('22dbfe1691c9813e250e80ae81629f0b4c018daf5acffa4818409014f540d32c02181655ccbb10afd914feaee41ca331414e4338d01c1f20fbeebc4038097793')

build() {
  cd dominate-$pkgver
  python -m build -nw
}

check() {
  cd dominate-$pkgver
  pytest
}

package() {
  cd dominate-$pkgver
  python -m installer -d "$pkgdir" dist/*.whl
}
